package me.zhengjie.modules.bushutongji.repository;

import me.zhengjie.modules.bushutongji.domain.Bushutongji;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @author xiexidong 
* @date 2019-07-24
*/
public interface BushutongjiRepository extends JpaRepository<Bushutongji, Integer>, JpaSpecificationExecutor {

    @Query(value = "select DISTINCT(t.danwei) from bushutongji t",nativeQuery = true)
    List<String> findDanwei();

}